<?php defined('SYSPATH') or die('No direct script access.');

class Controller_WWW_WeixinPay extends Controller_Template {
	public function __construct ($req, $res)
	{
		parent::__construct ($req, $res);
		$this->template = 'smarty:payment/blank';
	}
	
	public function action_pay(){

        $order = array(
            'body'=>'应用汇微信网页扫码支付测试',          //商品描述
            'out_trade_no'=>time(),      //商户订单号
            'total_fee'=>1,           //订单总金额，单位为分
        );

        $pay = new Pay_Pay($order);
        $img = $pay->create_pay_order();
        echo "<img src='".$img."'>";
        exit;
	}


    public function action_notify ()
    {
        $notify = new Payment_Weixin_Notify();
        $notify->Handle(false);
    }


}